

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="https://img.mkerosene.cn/touxiang.jpg">
  <link rel="icon" href="https://img.mkerosene.cn/touxiang.jpg">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Kerosene W">
  <meta name="keywords" content="">
  
    <meta name="description" content="Lombok常用注解加入 maven 依赖12345&lt;dependency&gt;    &lt;groupId&gt;org.projectlombok&lt;&#x2F;groupId&gt;    &lt;artifactId&gt;lombok&lt;&#x2F;artifactId&gt;    &lt;version&gt;1.18.12&lt;&#x2F;version&gt;&lt;&#x2F;dependency">
<meta property="og:type" content="article">
<meta property="og:title" content="Lombok常用注解">
<meta property="og:url" content="http://example.com/2022/02/02/Lombok%E6%B3%A8%E8%A7%A3/index.html">
<meta property="og:site_name" content="追求源于热爱">
<meta property="og:description" content="Lombok常用注解加入 maven 依赖12345&lt;dependency&gt;    &lt;groupId&gt;org.projectlombok&lt;&#x2F;groupId&gt;    &lt;artifactId&gt;lombok&lt;&#x2F;artifactId&gt;    &lt;version&gt;1.18.12&lt;&#x2F;version&gt;&lt;&#x2F;dependency">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123505093-120706027.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123608674-881008070.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123622420-39641215.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123632801-1579489628.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123644697-422140515.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123705271-239133946.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123713466-1515539870.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123802184-301313014.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123821803-1801908929.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123848772-196755613.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309123907759-554181302.png">
<meta property="og:image" content="https://img.mkerosene.cn/1003856-20200309124029891-1112211509.png">
<meta property="article:published_time" content="2022-02-02T03:14:16.000Z">
<meta property="article:modified_time" content="2022-02-02T13:49:52.752Z">
<meta property="article:author" content="Kerosene W">
<meta property="article:tag" content="note">
<meta property="article:tag" content="java">
<meta property="article:tag" content="spring">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://img.mkerosene.cn/1003856-20200309123505093-120706027.png">
  
  
  <title>Lombok常用注解 - 追求源于热爱</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.8.13","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":"❡"},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"https://img.mkerosene.cn/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":"FI1uAFAYz0Q3MPDiORqd0JAN-gzGzoHsz","app_key":"EhKAjMe3bmq0WLTSgktGg2OC","server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
</head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>mKerosene</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                友链
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://img.mkerosene.cn/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="Lombok常用注解">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2022-02-02 11:14" pubdate>
        2022年2月2日 上午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      2.3k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      8 分钟
    </span>
  

  
  
    
      <!-- LeanCloud 统计文章PV -->
      <span id="leancloud-page-views-container" class="post-meta" style="display: none">
        <i class="iconfont icon-eye" aria-hidden="true"></i>
        <span id="leancloud-page-views"></span> 次
      </span>
    
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Lombok常用注解</h1>
            
              <p class="note note-info">
                
                  本文最后更新于：1 年前
                
              </p>
            
            <div class="markdown-body">
              <h1 id="Lombok常用注解"><a href="#Lombok常用注解" class="headerlink" title="Lombok常用注解"></a>Lombok常用注解</h1><h4 id="加入-maven-依赖"><a href="#加入-maven-依赖" class="headerlink" title="加入 maven 依赖"></a><strong>加入 maven 依赖</strong></h4><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.projectlombok<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>lombok<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.18.12<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br></code></pre></td></tr></table></figure>



<p><img src="https://img.mkerosene.cn/1003856-20200309123505093-120706027.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<h4 id="1-Getter-Setter"><a href="#1-Getter-Setter" class="headerlink" title="1. @Getter/@Setter"></a>1. @Getter/@Setter</h4><p>自动产生 getter/setter</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123608674-881008070.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<h4 id="2-ToString"><a href="#2-ToString" class="headerlink" title="2. @ToString"></a>2. @ToString</h4><p>自动重写 <code>toString()</code> 方法，会印出所有变量</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123622420-39641215.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<h4 id="3-EqualsAndHashCode"><a href="#3-EqualsAndHashCode" class="headerlink" title="3. @EqualsAndHashCode"></a>3. @EqualsAndHashCode</h4><p>自动生成 <code>equals(Object other)</code> 和 <code>hashcode()</code> 方法，包括所有非静态变量和非 transient 的变量</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123632801-1579489628.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p> 如果某些变量不想要加进判断，可以透过 exclude 排除，也可以使用 of 指定某些字段</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123644697-422140515.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>Q : 为什么只有一个整体的 <code>@EqualsAndHashCode</code> 注解，而不是分开的两个 <code>@Equals</code> 和 <code>@HashCode</code>？</p>
<p>A : 在 Java 中有规定，当两个对象 equals 时，他们的 hashcode 一定要相同，反之，当 hashcode 相同时，对象不一定 equals。所以 equals 和 hashcode 要一起实现，免得发生违反 Java 规定的情形发生</p>
<h4 id=""><a href="#" class="headerlink" title=""></a></h4><h4 id="4-NoArgsConstructor-AllArgsConstructor-RequiredArgsConstructor"><a href="#4-NoArgsConstructor-AllArgsConstructor-RequiredArgsConstructor" class="headerlink" title="4. @NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor"></a>4. @NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor</h4><p>这三个很像，都是在自动生成该类的构造器，差别只在生成的构造器的参数不一样而已</p>
<p><strong>@NoArgsConstructor</strong> : 生成一个没有参数的构造器</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123705271-239133946.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p> <strong>@AllArgsConstructor</strong> : 生成一个包含所有参数的构造器</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123713466-1515539870.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>这里注意一个 Java 的小坑，当我们没有指定构造器时，Java 编译器会帮我们自动生成一个没有任何参数的构造器给该类，但是如果我们自己写了构造器之后，Java 就不会自动帮我们补上那个无参数的构造器了</p>
<p>然而很多地方（像是 Spring Data JPA），会需要每个类都一定要有一个无参数的构造器，所以你在加上 <code>@AllArgsConstructor</code> 时，一定要补上 <code>@NoArgsConstrcutor</code>，不然会有各种坑等着你</p>
<p><strong>@RequiredArgsConstructor</strong> : 生成一个包含 “特定参数” 的构造器，特定参数指的是那些有加上 final 修饰词的变量们</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123802184-301313014.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>补充一下，如果所有的变量都是正常的，都没有用 final 修饰的话，那就会生成一个没有参数的构造器</p>
<h4 id="-1"><a href="#-1" class="headerlink" title=""></a></h4><h4 id="5-Data"><a href="#5-Data" class="headerlink" title="5. @Data"></a>5. @Data</h4><p>整合包，只要加了 @Data 这个注解，等于同时加了以下注解</p>
<ul>
<li>@Getter/@Setter</li>
<li>@ToString</li>
<li>@EqualsAndHashCode</li>
<li>@RequiredArgsConstructor</li>
</ul>
<p><img src="https://img.mkerosene.cn/1003856-20200309123821803-1801908929.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>@Data 是使用频率最高的 lombok 注解，通常 @Data 会加在一个值可以被更新的对象上，像是日常使用的 DTO 们、或是 JPA 裡的 Entity 们，就很适合加上 @Data 注解，也就是 @Data for mutable class</p>
<h4 id="-2"><a href="#-2" class="headerlink" title=""></a></h4><h4 id="6-Value"><a href="#6-Value" class="headerlink" title="6. @Value"></a>6. @Value</h4><p>也是整合包，但是他会把所有的变量都设成 final 的，其他的就跟 @Data 一样，等于同时加了以下注解</p>
<ul>
<li>@Getter (注意没有setter)</li>
<li>@ToString</li>
<li>@EqualsAndHashCode</li>
<li>@RequiredArgsConstructor</li>
</ul>
<p><img src="https://img.mkerosene.cn/1003856-20200309123848772-196755613.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>上面那个 @Data 适合用在 POJO 或 DTO 上，而这个 @Value 注解，则是适合加在值不希望被改变的类上，像是某个类的值当创建后就不希望被更改，只希望我们读它而已，就适合加上 @Value 注解，也就是 @Value for immutable class</p>
<p>另外注意一下，此 lombok 的注解 @Value 和另一个 Spring 的注解 @Value 撞名，在 import 时不要 import 错了</p>
<h4 id="-3"><a href="#-3" class="headerlink" title=""></a></h4><h4 id="7-Builder"><a href="#7-Builder" class="headerlink" title="7. @Builder"></a>7. @Builder</h4><p>自动生成流式 set 值写法，从此之后再也不用写一堆 setter 了</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309123907759-554181302.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p>注意，虽然只要加上 @Builder 注解，我们就能够用流式写法快速设定对象的值，但是 setter 还是必须要写不能省略的，因为 Spring 或是其他框架有很多地方都会用到对象的 getter/setter 对他们取值/赋值</p>
<p>所以通常是 @Data 和 @Builder 会一起用在同个类上，既方便我们流式写代码，也方便框架做事</p>
<h4 id="-4"><a href="#-4" class="headerlink" title=""></a></h4><h4 id="8-Slf4j"><a href="#8-Slf4j" class="headerlink" title="8. @Slf4j"></a>8. @Slf4j</h4><p>自动生成该类的 log 静态常量，要打日志就可以直接打，不用再手动 new log 静态常量了</p>
<p><img src="https://img.mkerosene.cn/1003856-20200309124029891-1112211509.png" srcset="https://img.mkerosene.cn/loading.gif" lazyload alt="img"></p>
<p> 除了 @Slf4j 之外，lombok 也提供其他日志框架的变种注解可以用，像是 @Log、@Log4j…等，他们都是帮我们创建一个静态常量 log，只是使用的库不一样而已</p>
<figure class="highlight reasonml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs reasonml">@Log <span class="hljs-comment">//对应的log语句如下</span><br><span class="hljs-keyword">private</span> static final java.util.logging.Logger log = java.util.logging.<span class="hljs-module-access"><span class="hljs-module"><span class="hljs-identifier">Logger</span>.</span></span>get<span class="hljs-constructor">Logger(LogExample.<span class="hljs-params">class</span>.<span class="hljs-params">getName</span>()</span>);<br><br>@Log4j <span class="hljs-comment">//对应的log语句如下</span><br><span class="hljs-keyword">private</span> static final org.apache.log4j.Logger log = org.apache.log4j.<span class="hljs-module-access"><span class="hljs-module"><span class="hljs-identifier">Logger</span>.</span></span>get<span class="hljs-constructor">Logger(LogExample.<span class="hljs-params">class</span>)</span>;<br></code></pre></td></tr></table></figure>



<p>SpringBoot默认支持的就是 slf4j + logback 的日志框架，所以也不用再多做啥设定，直接就可以用在 SpringBoot project上，log 系列注解最常用的就是 @Slf4j</p>
<blockquote>
<p>文章来源:微信公众号-ImportNew-五分钟学会 Java 开发效率神器 Lombok</p>
</blockquote>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/note/">note</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/note/">note</a>
                    
                      <a class="hover-with-bg" href="/tags/java/">java</a>
                    
                      <a class="hover-with-bg" href="/tags/spring/">spring</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/12/23/%E3%80%90%E6%98%A5%E7%A7%8B%E4%BA%91%E5%A2%83%E3%80%91%C2%B7%20CVE-2022-32991/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">【春秋云境】· CVE-2022-32991</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2021/12/25/SCTF-%E4%B8%AA%E4%BA%BA%E8%83%BD%E5%8A%9B%E8%AE%A4%E8%AF%81-wp/">
                        <span class="hidden-mobile">SCTF-个人能力认证-wp</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments" lazyload>
                
                  
                
                
  <div id="twikoo"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#comments', function() {
      Fluid.utils.createScript('https://cdn.jsdelivr.net/npm/twikoo@1/dist/twikoo.all.min.js', function() {
        var options = Object.assign(
          {"envId":"blog-3gentarg3e6a1b5e","region":"ap-shanghai","path":"window.location.pathname"},
          {
            el: '#twikoo',
            path: 'window.location.pathname',
            onCommentLoaded: function() {
              Fluid.plugins.initFancyBox('#twikoo .tk-content img:not(.tk-owo-emotion)');
            }
          }
        )
        twikoo.init(options)
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <div class="copyright">&copy;2020 - 2021 By Kerosene.W</div> <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- LeanCloud 统计PV -->
        <span id="leancloud-site-pv-container" style="display: none">
            总访问量 
            <span id="leancloud-site-pv"></span>
             次
          </span>
      
      
        <!-- LeanCloud 统计UV -->
        <span id="leancloud-site-uv-container" style="display: none">
            总访客数 
            <span id="leancloud-site-uv"></span>
             人
          </span>
      

    
  </div>


  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/js/local-search.js" ></script>



  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  




  <script defer src="/js/leancloud.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
        typing(title);
      
    })(window, document);
  </script>












  

  

  

  

  

  





<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


</body>
</html>
